package ${package.Service};

import ${package.Entity}.${entity};
import ${superServiceClassPackage};
import com.wsd.jing.request.CommonRequest;

import java.util.List;
import java.util.Map;

/**
 * All rights Reserved, Designed By www.tom.com
 *
 * @author ${author}
 * @version 1.0.0
 * @projectName: ${project}
 * @packageName: ${package.Service}
 * @className: ${table.serviceName}
<#assign entityName = "">
<#if (table.comment?? && table.comment != '')>
    <#if table.comment?ends_with("表")>
        <#assign entityName = table.comment?substring(0,table.comment?length-1)>
    <#else>
        <#assign entityName = table.comment>
    </#if>
<#else>
    <#assign entityName = table.entityName>
</#if>
 * @description: ${entityName!}服务类
 * @createDate ${date}
 * @copyright ${date} www.tom.com Inc. All rights reserved.
 */
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {

    /**
     * @param ${entity?uncap_first}:${entityName!}
     * @return Boolean
     * @author ${author}
     * @description 新增${entityName!}
     * @createDate ${date}
     */
    Boolean insert${entity}(${entity} ${entity?uncap_first});

    /**
     * @param ${entity?uncap_first}:${entityName!}
     * @return Boolean
     * @author ${author}
     * @description 修改${entityName!}
     * @createDate ${date}
     */
    Boolean update${entity}(${entity} ${entity?uncap_first});

    /**
     * @param id:id
     * @return Boolean
     * @author ${author}
     * @description 删除${entityName!}
     * @createDate ${date}
     */
    Boolean delete${entity}(Integer id);

    /**
     * @param ids:id
     * @return Boolean
     * @author ${author}
     * @description 批量删除${entityName!}
     * @createDate ${date}
     */
    Boolean delete${entity}s(String ids);

    /**
     * @param id:id
     * @return ${entity}
     * @author ${author}
     * @description 查询${entityName!}
     * @createDate ${date}
     */
    ${entity} get${entity}(Integer id);

    /**
     * @param commonRequest:排序参数
     * @param ${entity?uncap_first}:${entityName!}
     * @return List<${entity}>
     * @author ${author}
     * @description 查询${entityName!}列表
     * @createDate ${date}
     */
    List<${entity}> list${entity}s(CommonRequest commonRequest, ${entity} ${entity?uncap_first});

    /**
     * @param commonRequest:分页参数
     * @param ${entity?uncap_first}:${entityName!}
     * @return Map<String, Object>
     * @author ${author}
     * @description 分页查询${entityName!}列表
     * @createDate ${date}
     */
    Map<String, Object> listPage${entity}s(CommonRequest commonRequest, ${entity} ${entity?uncap_first});
}
</#if>
